package com.ruoyi.business.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.HurtRecoveryGuideMapper;
import com.ruoyi.business.domain.HurtRecoveryGuide;
import com.ruoyi.business.service.IHurtRecoveryGuideService;

/**
 * 康复指导Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-20
 */
@Service
public class HurtRecoveryGuideServiceImpl implements IHurtRecoveryGuideService
{
    @Autowired
    private HurtRecoveryGuideMapper hurtRecoveryGuideMapper;

    /**
     * 查询康复指导
     *
     * @param id 康复指导主键
     * @return 康复指导
     */
    @Override
    public HurtRecoveryGuide selectHurtRecoveryGuideById(Long id)
    {
        return hurtRecoveryGuideMapper.selectHurtRecoveryGuideById(id);
    }

    /**
     * 查询康复指导列表
     *
     * @param hurtRecoveryGuide 康复指导
     * @return 康复指导
     */
    @Override
    public List<HurtRecoveryGuide> selectHurtRecoveryGuideList(HurtRecoveryGuide hurtRecoveryGuide)
    {
        return hurtRecoveryGuideMapper.selectHurtRecoveryGuideList(hurtRecoveryGuide);
    }

    /**
     * 新增康复指导
     *
     * @param hurtRecoveryGuide 康复指导
     * @return 结果
     */
    @Override
    public int insertHurtRecoveryGuide(HurtRecoveryGuide hurtRecoveryGuide)
    {
        hurtRecoveryGuide.setCreateTime(DateUtils.getNowDate());
        return hurtRecoveryGuideMapper.insertHurtRecoveryGuide(hurtRecoveryGuide);
    }

    /**
     * 修改康复指导
     *
     * @param hurtRecoveryGuide 康复指导
     * @return 结果
     */
    @Override
    public int updateHurtRecoveryGuide(HurtRecoveryGuide hurtRecoveryGuide)
    {
        return hurtRecoveryGuideMapper.updateHurtRecoveryGuide(hurtRecoveryGuide);
    }

    /**
     * 批量删除康复指导
     *
     * @param ids 需要删除的康复指导主键
     * @return 结果
     */
    @Override
    public int deleteHurtRecoveryGuideByIds(Long[] ids)
    {
        return hurtRecoveryGuideMapper.deleteHurtRecoveryGuideByIds(ids);
    }

    /**
     * 删除康复指导信息
     *
     * @param id 康复指导主键
     * @return 结果
     */
    @Override
    public int deleteHurtRecoveryGuideById(Long id)
    {
        return hurtRecoveryGuideMapper.deleteHurtRecoveryGuideById(id);
    }

    @Override
    public List<Map<String, Object>> getRecoveryGuideList() {
        return hurtRecoveryGuideMapper.getRecoveryGuideList();
    }
}
